package cn.sangkf.litemall.ware.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author : sangkf
 * @package : cn.sangkf.litemall.ware.config.WareMyBatisConfig
 * @date : 2021/1/6 下午8:39 星期三
 * @description : TODO
 * @version: 1.0
 * <p>Copyright: Copyright (c) 2020</p>
 */
@Configuration
@EnableTransactionManagement
@MapperScan(basePackages = "cn.sangkf.litemall.ware.dao")
public class WareMyBatisConfig {

    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        paginationInterceptor.setOverflow(true);
        return paginationInterceptor;
    }

}
